﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using log4net;
using RealState.BusinessObjects;
using RealState.BLL;

namespace RealState.W.uc
{
    public partial class ListServices : System.Web.UI.UserControl
    {
        private ILog log = LogManager.GetLogger("News");

        private NewsBLL newsBLL;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                LoadData();
            }
        }
        private void LoadData()
        {
            newsBLL = new NewsBLL();
            try
            {

                Repeater1.DataSource = newsBLL.GetNewss_2().Where(b => b.RowNum < 6).ToList();
                Repeater1.DataBind();

            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
            }
        }
    }
}